import React from "react";
import PayItem from "../loanOrPayItem/repay";
import Banner from "@/views/viewCommon/Banner";

const Pay = props => {
	const { data = [], banner, children } = props;
	return (
		<div className="loan-and-pay-detail-pay">
			{!!banner.length && (
				<Banner bannerList={banner} history={props.history} />
			)}

			{data.map((item, index) => (
				<PayItem repayData={item} key={index} />
			))}
			{!data.length && children}
		</div>
	);
};
export default Pay;
